# name : surv.hr.mdd
# key: surv.hr.mdd
# contributor: Shuguang Sun
# --
${1:hrmdd} <- function (ratio = 1, hr0 = 1, alpha = 0.025, sided = 1, d = 200) {
  c <- 1/(1 + ratio)
  psi <- c * (1 - c)
  if (is.null(hr0)) {
      hr0 <- 1
  }
  zalpha <- -stats::qnorm(alpha/sided)
  hrHat <- exp(-zalpha/sqrt(d * psi)) * hr0
  hrHat
}
$1(d = ${2:100})
